home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / utility / obskit.zip / INSTALL.BAT < prev    next >
DOS Batch File  |  1992-01-11  |  5KB  |  124 lines

  1. echo off
  2.  
  3.    rem                           INSTALL.BAT
  4.    rem
  5.    rem  Install program for Obs Toolkit Version 1.5
  6.    rem
  7.    rem  ObsRes will not work with NDOS or 4DOS!
  8.    rem  Use the xDOS.CFG file instead.
  9.    rem
  10.    rem                     Obs Toolkit is Shareware!
  11.    rem
  12.    rem                           Contrails, Inc.
  13.    rem                            P.O. Box 2759
  14.    rem                        Lompoc, CA 93438-2759
  15.    rem                           (805) 733-2808
  16.    rem
  17.    echo ╓───────────────────────────────────────────────────────────────╖
  18.    rem  ║                                                               ║
  19.    echo ║                   ╔══════════════════════╗                    ║
  20.    echo ║                   ║Welcome to Obs Toolkit╟┐                   ║
  21.    echo ║                   ╚╤═════════════════════╝│                   ║
  22.    echo ║                    │      Version 1.5     │                   ║
  23.    echo ║                    └──────────────────────┘                   ║
  24.    echo ║                                                               ║
  25.    echo ║  Obs Toolkit can significantly enhance your                   ║
  26.    echo ║     o command line       o toolchest        o batch files     ║
  27.    echo ║                                                               ║
  28.    echo ╠═══════════════════════════════════════════════════════════════╣
  29.    echo ║  This installation routine will                               ║
  30.    echo ║    o save your current AUTOEXEC.BAT to AUTOEXEC.1B4           ║
  31.    echo ║    o install ObsRes (resident alias translator and DirStack)  ║
  32.    echo ║    o install RECursive aliases                                ║
  33.    echo ║      -- define the OB alias                                   ║
  34.    echo ║      -- save the aliases into ALIASES.FIL                     ║
  35.    echo ║    o append to your AUTOEXEC.BAT                              ║
  36.    echo ║      -- [obs_path]\obsres                                     ║
  37.    echo ║      -- [obs_path]\alias /file [obs_path]\aliases.fil         ║
  38.    rem  ╠═══════════════════════════════════════════════════════════════╣
  39.    rem  ║            Thank you for installing Obs Toolkit               ║
  40.    rem  ║                                                               ║
  41.    rem  ║                     ╔═════════════════╗                       ║
  42.    rem  ║                     ║Support Shareware╟┐                      ║
  43.    rem  ║   $39.00            ╚╤════════════════╝│            $39.00    ║
  44.    rem  ║                      └─────────────────┘                      ║
  45.    rem  ║                                                               ║
  46.    rem  ║                        ┌─────────┐                            ║
  47.    rem  ║                  ┌─────┴───┐     │               (R)          ║
  48.    rem  ║                ──│         │o    │──────────────────          ║
  49.    rem  ║                  │   ┌─────┴╨──┐ │  Association of            ║
  50.    rem  ║                  │   │         │─┘  Shareware                 ║
  51.    rem  ║                  └───│    o    │    Professionals             ║
  52.    rem  ║                ──────│    ║    │────────────────────          ║
  53.    rem  ║                      └────╨────┘    MEMBER                    ║
  54.    rem  ║                                                               ║
  55.    echo ╙───────────────────────────────────────────────────────────────╜
  56.    echo 
  57.    if not exist obsres.com goto wrong_dir
  58.    for %%f in (alias.exe aliases.rec fd.exe) do if not exist %%f goto missing
  59.    for %%f in (ocd.exe lf.exe mf.exe ee.exe) do if not exist %%f goto missing
  60.    for %%f in (locate.exe ds.exe) do if not exist %%f goto missing
  61.    echo To abort this installation press "Ctrl-C" otherwise
  62.    pause
  63.  
  64.    rem  Install ObsRes (if it isn't already)
  65.         obsres
  66.  
  67.    rem  Load in the RECursive alias definition file
  68.         alias /clear /file aliases.rec
  69.         if errorlevel 6 goto terminate
  70.  
  71.    rem  Save the users current autoexex.bat
  72.         if not exist c:\autoexec.bat goto no_autoexec
  73.         mf /c c:\AUTOEXEC.BAT c:\AUTOEXEC.1B4
  74.  
  75. :no_autoexec
  76.    rem  Create an environment, just for us. Don't want to use the current
  77.    rem  environment, it may not have enough space
  78.    rem  Save the users current environment, then clear it out
  79.         ee /save env.fil /clear
  80.  
  81.    rem  save the current directory into the environment variable 'dir'
  82.         ee /make dir
  83.  
  84.    rem  see if we need to add a slash
  85.         if exist %dir%aliases.rec goto continue
  86.         ee /append \ dir
  87.  
  88. :continue
  89.    rem  Creat the OB alias
  90.         alias /make ob
  91.  
  92.    rem  Write out a custom alias definition file with OB defined
  93.         alias > %dir%aliases.fil
  94.  
  95.    rem  Add the ObsRes and Alias load commands to the AUTOEXEC.BAT
  96.         echo %dir%obsres >> c:\autoexec.bat
  97.         echo %dir%alias /file %dir%aliases.fil >> c:\autoexec.bat
  98.  
  99.    rem  Clear out our temporary environment, and restore the previous
  100.         ee /clear /load env.fil
  101.  
  102.    rem  Delete the temporary environment file
  103.         mf /d env.fil
  104.  
  105.    echo Installation complete
  106.         goto done
  107.  
  108. :wrong_dir
  109.    echo *** ERROR ***
  110.    echo You must be located in the Toolkit directory!
  111.         goto terminate
  112.  
  113. :missing
  114.    echo *** ERROR ***
  115.    echo All "required" Toolkit files are not present in this directory!
  116.         goto terminate
  117.  
  118. :terminate
  119.    echo Installation terminated
  120.         goto done
  121.  
  122. :done
  123.    echo 
  124.